enableZoomAutoFit

abstract fun enableZoomAutoFit(block: DesignBlock, axis: ZoomAutoFitAxis, paddingLeft: Float = 0.0f, paddingTop: Float = 0.0f, paddingRight: Float = 0.0f, paddingBottom: Float = 0.0f)

Continually adjusts the zoom level to fit the width or height of a block's axis-aligned bounding box. This only shows an effect if the zoom level is not handled/overwritten by the UI. Without padding, this results in a tight view on the block. No more than one block per scene can have zoom auto-fit enabled. Calling setZoomLevel or zoomToBlock disables the continuous adjustment.

Parameters

block

the block in the scene for which to enable a zoom auto-fit.

axis

the block axis (or axes) for which the zoom is adjusted.

paddingLeft

optional padding in screen pixels to the left of the block.

paddingTop

optional padding in screen pixels to the top of the block.

paddingRight

optional padding in screen pixels to the right of the block.

paddingBottom

optional padding in screen pixels to the bottom of the block.